﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Utility.BehaviourTree
{
	public class InverterNode : DecoratorNode
	{
		protected override Status OnUpdate ()
		{
			switch (ChildNode.Update ())
			{
				default:
					return Status.Error;
				case Status.Failure:
					return Status.Success;
				case Status.Success:
					return Status.Failure;
				case Status.Running:
					return Status.Running;
			}
		}

	}
}